package org.panda.tcmoc.action;

import org.eclipse.jface.action.Action;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.panda.tcmoc.view.SpInquiryEditorInput;
import org.panda.tcmoc.view.SpInquiryEditorPart;

public class OpenSpInquiryEditorAction extends Action {
	private IWorkbenchWindow window;

	public OpenSpInquiryEditorAction(IWorkbenchWindow window) {
		this.window = window;
		this.setText("&Inquiry");
	}

	public void run() {
		try {
			this.window.getActivePage().openEditor(new SpInquiryEditorInput(),
					SpInquiryEditorPart.ID);
		} catch (PartInitException e) {
			e.printStackTrace();
		}
	}

}
